#pragma once

#include <string>
#include <vector>
#include "db_handler.h"

namespace TakeAwayPlatform
{
    class CartModule
    {
    public:
        CartModule(DatabaseHandler& dbHandler);

        bool addItemToCart(int user_id, int dish_id, int quantity);
        bool removeItemFromCart(int user_id, int dish_id);
        bool updateItemQuantityInCart(int user_id, int dish_id, int quantity);
        bool getCartItems(int user_id, std::vector<std::pair<int, int>>& cart_items);
        bool clearCart(int user_id);

    private:
        DatabaseHandler& dbHandler;
    };
}